Skip to content

feat: customizable fill handle config #1068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

BrianHung
Copy link
Collaborator

@BrianHung BrianHung commented Jul 18, 2025

Allows fill handle to be customizable. Default is rectangle offset on the corner with outline.

image

@lukasmasuch lukasmasuch requested a review from Copilot August 8, 2025 23:06
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces customizable fill handle configuration, allowing users to control the shape, size, position, and outline of the fill handle (the drag square in the bottom-right corner of a cell selection). The default behavior is maintained with a rectangular handle offset on the corner with an outline.

  • Changes the fillHandle prop from a boolean to accept either a boolean or a partial configuration object
  • Adds support for circular and square fill handle shapes with customizable size and positioning
  • Updates rendering logic to draw the fill handle with configurable outline and positioning

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/core/src/internal/data-grid/data-grid-types.ts Defines new FillHandleConfig type and DEFAULT_FILL_HANDLE constant
packages/core/src/internal/data-grid/render/draw-grid-arg.ts Updates DrawGridArg interface to use FillHandle type instead of boolean
packages/core/src/internal/data-grid/render/data-grid.render.rings.ts Implements new fill handle rendering logic with shape, size, and outline support
packages/core/src/internal/data-grid/render/data-grid-render.ts Updates fill handle visibility check to work with new type
packages/core/src/internal/data-grid/data-grid.tsx Updates mouse position detection logic for customizable fill handle dimensions
packages/core/src/docs/examples/fill-handle.stories.tsx Updates example to demonstrate new configuration options
packages/core/API.md Updates documentation to reflect new fillHandle configuration options

@BrianHung
Copy link
Collaborator Author

BrianHung commented Aug 8, 2025

Addressed copilot comments; fixing merge.

Copy link
Collaborator

@lukasmasuch lukasmasuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 I added a couple of minor tweaks: added allowedFillDirections and onFillPattern to API.md, changed the default fill handle to the current state (4px, without outline in the right corner and extended the storybook case a bit.

@lukasmasuch lukasmasuch merged commit ec392f4 into glideapps:main Aug 14, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants